package com.vonchange.water.pvm;

import com.vonchange.water.pvm.behavior.ActivityBehavior;
import com.vonchange.water.pvm.execution.ActivityExecution;
import com.vonchange.water.pvm.model.definition.PvmLine;
import com.vonchange.water.pvm.model.runtime.ProcessInstance;

public class RunUtil {
    public static void goLine(ProcessInstance processInstance, PvmLine pvmLine, String  name) throws Exception {
        if(null==name||"".equals(name)) return;
        ActivityBehavior activityBehavior = findActivityBehaviorByType("line");
        if(null==activityBehavior) return;
        ActivityExecution executionTo = new ActivityExecution();
        executionTo.setProcessInstance(processInstance);
        executionTo.setCurrentActivityId(pvmLine.getId());
        activityBehavior.execute(executionTo);
    }
    public static ActivityBehavior findActivityBehaviorByType(String type){
        return null;
    }

}
